float sampleWeights[15];
float2 sampleOffsets[15];

texture depthMap;
sampler inputTexture = sampler_state 
{
	texture = <depthMap>;
	magfilter = LINEAR;
	minfilter = LINEAR;	
	AddressU = clamp;
	AddressV = clamp;
};

struct VS_INPUT
{
	float4 Position		: POSITION;
	float2 TexCoords	: TEXCOORD0;
};

struct VS_OUTPUT
{
	float4 Position : POSITION;
	float2 TexCoords : TEXCOORD0;
};

VS_OUTPUT GaussianBlur_VS (VS_INPUT Input)
{
	VS_OUTPUT Output;

	Output.Position  = Input.Position;
	Output.TexCoords = Input.TexCoords;
	
	return Output;
}

float4 GaussianBlur_PS (VS_OUTPUT Input) : COLOR0
{
	float4 color = 0.0f;
	
	for(int i = 0; i < 15; i++ )
	{
		color += tex2D(inputTexture, saturate(Input.TexCoords + sampleOffsets[i])) * sampleWeights[i];
	}
	
	return color;
}

technique Blur
{
	pass P0
	{
		VertexShader = compile vs_2_0 GaussianBlur_VS();
		PixelShader = compile ps_2_0 GaussianBlur_PS();
	}
}
